<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/5/27
  Time: 11:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>Title</title>
    <base href="http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/">
    <script type="text/javascript" src="jquery/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="layer/layer.js"></script>
    <script type="text/javascript">

        $(function () {
            $("#btn1").click(function () {
                layer.msg("layer弹框")
            });
        });
    </script>
    <%--base标签：页面请求的绝对路径地址--%>
    <%--${pageContext.request.severName}服务器名--%>
    <%--${pageContext.request.severPort}端口号，前面的冒号不能省略--%>
    <%--${pageContext.request.contextPath}web项目的根路径，前面没有斜杠，后面有斜杠--%>
</head>
<body>
<%--这里的链接如果用斜杠开头的话，就是相对项目路径，所以不能有斜杠--%>
<%--不写斜杠的话就能参考base标签，用绝对路径进行访问--%>
<a href="test/ssm.html">测试ssm整合</a>
<a href="admin/to/login/page.html">主页</a>
<hr/>
<button id="btn1" >弹框</button>

</body>
</html>
